<script setup lang="ts">
// import { CountButton, useDrawer, CButton, BasicHelp, BasicArrow } from 'hickey-ui';
// import { useDrawer, CButton } from '@/components';
import { useDrawer, CButton, useModal } from 'hickey-ui';
import TestBasicDrawer from './components/TestBasicDrawer.vue';
import TestBasicModal from './components/TestBasicModal.vue';

const [registerModal, { openModal }] = useModal();
const [registerDrawer, { openDrawer }] = useDrawer();

function handleOpenDrawer(record) {
  openDrawer(true, { record, isUpdate: true });
}

function handleOpenModal(record) {
  openModal(true, { record, isUpdate: true });
}
</script>

<template>
  <main>
    <!-- <BasicArrow :up="true">123123</BasicArrow> -->
    <!-- <AceEditor :readonly="false" :value="JSON.stringify({ name: '123' })" mode="json" :height="500" /> -->
    <!-- <CountButton>啊实打实的</CountButton> -->
    <!-- <BasicHelp :text="['helloword']"> helloword </BasicHelp> -->

    <CButton type="primary" @click="() => handleOpenDrawer({})">open drawer</CButton>
    <CButton type="primary" @click="() => handleOpenModal({})">open modal</CButton>
    <TestBasicDrawer @register="registerDrawer" />
    <TestBasicModal @register="registerModal" />
  </main>
</template>
